package com.androidx.p013lv.invention.view;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.androidx.p013lv.base.bean.BoardListBean;
import com.androidx.p013lv.invention.C1069R;

/* renamed from: com.androidx.lv.invention.view.SixItemView */
public class SixItemView extends LinearLayout {
    TextView tv_info;
    TextView tv_title;

    public SixItemView(Fragment fragment, BoardListBean boardListBean, int i) {
        super(fragment.getContext());
        View inflate = LayoutInflater.from(fragment.getContext()).inflate(C1069R.C1074layout.item_six_item, (ViewGroup) null);
        View findViewById = inflate.findViewById(C1069R.C1072id.v_line);
        this.tv_title = (TextView) inflate.findViewById(C1069R.C1072id.tv_title);
        this.tv_info = (TextView) inflate.findViewById(C1069R.C1072id.tv_info);
        if (i == 0) {
            findViewById.setVisibility(4);
            setOnDefault(true);
        } else {
            findViewById.setVisibility(0);
        }
        this.tv_title.setText(boardListBean.getBoardName());
        this.tv_info.setText(boardListBean.getSubtitle());
        addView(inflate, -1, -1);
    }

    public void setOnDefault(boolean z) {
        if (z) {
            this.tv_info.setBackgroundColor(Color.parseColor("#FF545A"));
            this.tv_info.setTextColor(Color.parseColor("#ffffff"));
            return;
        }
        this.tv_info.setBackground(null);
        this.tv_info.setTextColor(Color.parseColor("#ababab"));
    }
}
